package com.dstz.bpm.api.constant;

public enum MultiInstanceType {
   NO("no", "单实例"),
   PARALLEL("parallel", "并行"),
   SEQUENTIAL("sequential", "串行");

   private String key = "";
   private String value = "";

   private MultiInstanceType(String key, String value) {
      this.key = key;
      this.value = value;
   }

   public String getKey() {
      return this.key;
   }

   public void setKey(String key) {
      this.key = key;
   }

   public String getValue() {
      return this.value;
   }

   public void setValue(String value) {
      this.value = value;
   }

   public String toString() {
      return this.key;
   }

   public static MultiInstanceType fromKey(String key) {
      MultiInstanceType[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         MultiInstanceType c = var1[var3];
         if (c.getKey().equalsIgnoreCase(key)) {
            return c;
         }
      }

      throw new IllegalArgumentException(key);
   }
}
